import java.util.Scanner;

/**
 * @author 1x
 * @Description
 * @date 2019/11/6
 */
public class Demo7 {
    public  static void main(String[] args){
        Scanner input=new Scanner(System.in);
        System.out.println("请输入七位数");
        int num = input.nextInt();
        if (num<9999999&&num>1000000){
            String s=String.valueOf(num);
            System.out.println("七位数是："+s);
            int a=num%10;
            int b=num/10%10;
            int c=num/100%10;
            int d=num/1000%10;
            int e=num/10000%10;
            int f=num/100000%10;
            int g=num/1000000;
            double B=a*c*e*g;
            int C=b+d+f;
            System.out.println("第七位是："+g);
            System.out.println("第六位是："+f);
            System.out.println("第五位是："+e);
            System.out.println("第四位是："+d);
            System.out.println("第三位是："+c);
            System.out.println("第二位是："+b);
            System.out.println("第一位是："+a);
            if (B!=0){
                System.out.println(C/B);
            }else{
                System.out.println(B+"不能作为除数");
            }
            if (C!=0){
                System.out.println(B/C);
            }else{
                System.out.println(C+"不能作为除数");
            }
        }else{
            System.out.println("请重新输入七位数");
        }
    }
}
